<?php

namespace App\Http\Controllers\Home\Articles;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redis;
use App\Http\Controllers\Controller;
use App\Http\Controllers\Admin\Articles\Api\ArticlesApi;
use App\Model\Articles;


class ArticlesController extends Controller
{
    /**
     * 加载文章详情页面
     * @param  [int] $id 文章id
     * @return 文章详情页面
     */
    public function articleDetail($id)
    {

        $article = ArticlesApi::getArticleDetail($id);

        // dd($article);
        
        //增加点击量
        ArticlesApi::addArticleClick($id);

        return view('Home/Articles/detail', [

                'article' => $article,
            ]);

    }


    



}
